﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="2004.aspx.cs" Inherits="_20_2004" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script type="text/javascript">
        function update(msg) {
            __doPostBack('<%=UpdatePanel1.ClientID%>', '');
            tb_remove();
            alert(msg);
        }

        function pageLoad(sender, args) {
            if (args.get_isPartialLoad()) {
                //  reapply the thick box stuff
                tb_init('a.thickbox, input.thickbox,');
            }
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
        SelectMethod="Get_album_AllData"
        TypeName="CCH.DAO.albumDAO">
        <SelectParameters>
            <asp:Parameter Name="alb_type" Type="Int32" />
        </SelectParameters>
        
    </asp:ObjectDataSource>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="DivButton">
                <asp:Button ID="btn_del" class="del" runat="server" Text="刪除相簿" OnClientClick="return confirm('確定要刪除?')"
                    OnClick="btn_del_Click" />
                <input type="button" value="新增相簿" class="thickbox new" alt='<%=Get_url_new() %>'>
            </div>
            <asp:ListView ID="ListView1" runat="server" DataSourceID="ObjectDataSource1" DataKeyNames="Album">
                <LayoutTemplate>
                    <div class="box">
                        <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                    </div>
                </LayoutTemplate>
                <ItemTemplate>
                    <div class="content">
                        <div class="photo_bg1">
                            <asp:HyperLink ID="HyperLink3" CssClass="a-letter-t2" runat="server" NavigateUrl='<%# String.Format("2004-2.aspx?alb_no={0}&type={1}",Eval("Album.alb_no"),Request["type"])%>'>
                                <asp:Image ID="Image1" runat="server" CssClass="pic_01" AlternateText='<%#Eval("Album.alb_name") %>'
                                    ImageUrl='<%# String.Format("2004-3.ashx?alb_no={0}&pho_no={1}",Eval("Album.alb_no"),Eval("Album.alb_cover"))%>' />
                            </asp:HyperLink>
                        </div>
                        <div class="ps2">
			  <div>
                            <asp:CheckBox ID="CheckBox1" runat="server" />
                            <asp:HyperLink ID="HyperLink2" runat="server" CssClass="thickbox imageButton edit"
                                NavigateUrl='<%# Get_url(Eval("Album.alb_no")) %>'><span>修改</span></asp:HyperLink>
                          </div>
                            <asp:HyperLink ID="HyperLink1" CssClass="a-letter-t2" runat="server" NavigateUrl='<%# String.Format("2004-2.aspx?alb_no={0}&type={1}",Eval("Album.alb_no"),Request["type"])%>'>
                     <%#Eval("Album.alb_name") %>
                    <br />
                      <%#Eval("Album.alb_desc") %>&nbsp;
                            </asp:HyperLink>
                        </div>
                        <div class="ps3">
                            <%#Eval("Count") %>
                            張相片
                        </div>
                    </div>
                </ItemTemplate>
                <EmptyDataTemplate>
                    無任何相簿
                </EmptyDataTemplate>
            </asp:ListView>
        </ContentTemplate>
    </asp:UpdatePanel>




</asp:Content>

